module.exports = app => {
  const mongoose = require('mongoose')
  //'mongodb://admin:123456@localhost:27017/'; 
  mongoose.connect('mongodb://localhost/learning-notebook', {
    useNewUrlParser: true,
    useUnifiedTopology: true
  })
  mongoose.connection.once("open", () => {
    console.log("数据库连接成功");
  });
}
